package com.my.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class toUpperCase extends BodyTagSupport {
    @Override
    public int doEndTag() throws JspException {
        try {
            String content = getBodyContent().getString();
            content = content.toUpperCase();
            bodyContent.getEnclosingWriter().write(content);
        }catch (Exception e){
            e.printStackTrace();
        }
        return super.doEndTag();
    }
}
